Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing incorrect versioning on close records #4786

Merged
merged 4 commits into from
Jan 23, 2025

Conversation

SergeyGaluzo
Copy link
Contributor

@SergeyGaluzo SergeyGaluzo commented Jan 17, 2025

Fixes bug https://microsofthealth.visualstudio.com/Health/_workitems/edit/138656

If all clocks (i.e. clocks of processing clients and the database clock) are synchronized, explicit input lastUpdated on the ingested resource should always be either in the past or current relative to the database clock. This rule is important in order to guarantee that records without explicit lastUpdated (when they are processed in parallel with records with explicit lastUpdated) are loaded with correct versions and history flags in the database. To facilitate this logic, input parser rejects records with explicit lastUpdated pointing too far in the future (>10 seconds). 10 seconds "future tolerance" should be more than enough for current computer systems. "Future tolerance" interval cannot be arbitrary large to minimize number of retries required to land input records without explicit lastUpdated after latest records in the database.

@SergeyGaluzo SergeyGaluzo requested a review from a team as a code owner January 17, 2025 19:16
@SergeyGaluzo SergeyGaluzo added Bug Bug bug bug. Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs Schema Version backward compatible labels Jan 17, 2025
@SergeyGaluzo SergeyGaluzo changed the title Fixing incorrect versioning on close duplicates Fixing incorrect versioning on close records Jan 18, 2025
@SergeyGaluzo SergeyGaluzo merged commit 559b114 into main Jan 23, 2025
46 of 52 checks passed
@SergeyGaluzo SergeyGaluzo deleted the users/sergal/versionfix branch January 23, 2025 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs Bug Bug bug bug. Schema Version backward compatible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants